<div class="updated" style="background:#f0f8ff; border:1px solid #addae6">
    <p><?php _e( 'If you like this plugin, please help keep it up to date by <a href="http://www.jfarthing.com/donate">donating through PayPal</a>!', 'theme-my-profile' ); ?></p>
</div>

<div class="wrap">
    <?php screen_icon( 'options-general' ); ?>
    <h2><?php _e( 'Theme My Profile Settings', 'theme-my-profile' ); ?></h2>

    <form action="options.php" method="post">
    <?php settings_fields( 'theme_my_profile_settings' ); ?>

    <h3><?php _e( 'General Settings', 'theme-my-profile' ); ?></h3>
    <table class="form-table">
		<tr valign="top">
			<th scope="row"><label for="page_id"><?php _e( 'Page ID', 'theme-my-profile' ); ?></label></th>
			<td>
				<input name="theme_my_profile[page_id]" type="text" id="page_id" value="<?php echo (int) $Theme_My_Profile->options['page_id']; ?>" class="small-text" />
				<p class="description"><?php _e( 'This should be the ID of the WordPress page that includes the [theme-my-profile] shortcode. By default, this page is titled "Profile".', 'theme-my-profile' ); ?></p>
			</td>
		</tr>
		<tr valign="top">
			<th scope="row"><?php _e( 'Show In Pagelist', 'theme-my-profile' ); ?></th>
			<td>
				<input name="theme_my_profile[show_page]" type="radio" id="show_page_always" value="always"<?php checked( 'always', $Theme_My_Profile->options['show_page'] ); ?> />
				<label for="show_page_always"><?php _e( 'Always', 'theme-my-profile' ); ?></label><br />
				<input name="theme_my_profile[show_page]" type="radio" id="show_page_logged" value="logged"<?php checked( 'logged', $Theme_My_Profile->options['show_page'] ); ?> />
				<label for="show_page_logged"><?php _e( 'When Logged In', 'theme-my-profile' ); ?></label><br />
				<input name="theme_my_profile[show_page]" type="radio" id="show_page_never" value="never"<?php checked( 'never', $Theme_My_Profile->options['show_page'] ); ?> />
				<label for="show_page_never"><?php _e( 'Never', 'theme-my-profile' ); ?></label>
				<p class="description"><?php _e( 'This setting effects the inclusion of the profile page in pagelists generated by functions like wp_list_pages() and wp_page_menu().', 'theme-my-profile' ); ?></p>
			</td>
		</tr>
        <tr valign="top">
            <th scope="row"><?php _e( 'Stylesheet', 'theme-my-profile' ); ?></th>
            <td>
                <input name="theme_my_profile[use_css]" type="checkbox" id="use_css" value="1" <?php checked( 1, $Theme_My_Profile->options['use_css'] ); ?> />
                <label for="use_css"><?php _e( 'Use theme-my-profile.css', 'theme-my-profile' ); ?></label>
                <p class="description"><?php _e( 'In order to keep changes between upgrades, you can store your customized "theme-my-profile.css" in your current theme directory.', 'theme-my-profile' ); ?></p>
            </td>
        </tr>
    </table>

    <h3><?php _e( 'Template Settings', 'theme-my-profile' ); ?></h3>
    <table class="form-table">
        <tr valign="top">
            <th scope="row"><?php _e( 'Profiles To Theme', 'theme-my-profile' ); ?></label></th>
            <td>
        <?php foreach ( $wp_roles->get_names() as $role => $title ) : ?>
                <input name="theme_my_profile[theme_profile][<?php echo $role; ?>]" type="checkbox" id="theme_profile_<?php echo $role; ?>" value="1"<?php checked( 1, $Theme_My_Profile->options['theme_profile'][$role] ); ?> />
                <label for="theme_profile_<?php echo $role; ?>"><?php echo $title; ?></label><br />
        <?php endforeach; ?>
            </td>
        </tr>
        <tr valign="top">
            <th scope="row"><?php _e( 'Block Admin Area For', 'theme-my-profile' ); ?></label></th>
            <td>
        <?php foreach ( $wp_roles->get_names() as $role => $title ) : ?>
                <input name="theme_my_profile[admin_lockout][<?php echo $role; ?>]" type="checkbox" id="admin_lockout_<?php echo $role; ?>" value="1"<?php checked( 1, $Theme_My_Profile->options['admin_lockout'][$role] ); ?> />
                <label for="admin_lockout_<?php echo $role; ?>"><?php echo $title; ?></label><br />
        <?php endforeach; ?>
            <p class="description"><?php _e( '<strong>NOTICE</strong>: Do not lock yourself out or you will have to delete the plugin to re-gain access!', 'theme-my-profile' ); ?></p>
            </td>
        </tr>
    </table>

    <p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Changes' ); ?>" /></p>
    </form>
</div>
